class Solution(object):
    def findRelativeRanks(self, score):
        """
        :type score: List[int]
        :rtype: List[str]
        """
        n = len(score)
        score = [[score[i], i] for i in range(n)]
        score.sort(reverse=True)
        M = [str(i + 1) for i in range(n)]
        if n >= 1:
            M[0] = 'Gold Medal'
        if n >= 2:
            M[1] = 'Silver Medal'
        if n >= 3:
            M[2] = 'Bronze Medal'
        out = [''] * n
        for i in range(n):
            out[score[i][1]] = M[i]
        return out
